package com.joehongfa.util;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {
	static String pathName = "src/main/resource/crawersetting.properties";

	public static String getPropertyByKey(String key) {
		Properties props = new Properties();
		try {
			FileReader fileReader = new FileReader(new File(pathName));
			props.load(fileReader);
		} catch (IOException e) {
			e.printStackTrace();
		}
		String value = props.getProperty(key);
		return value;
	}
}
